﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Car2010r.aspx.cs" Inherits="Updms.Car.Car2010r" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>
<%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments" TagPrefix="chartfxadornments" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Car2010r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->	
		</td>
	</tr>
	<tr>
		<td id="menu_area">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->	
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Car2010r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_chart" Text="챠트" runat="server" CssClass="ibtn ibtn_chart" OnClientClick="return chkSearch(event)" OnClick="ibtn_chart_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl" width="10%"><asp:Literal ID="ltr_search_car_id" Text="차량" runat="server" /></td>
					<td class="ctl" width="22%"><asp:dropdownlist id="ddl_search_car_id" runat="server" CssClass="ddl"></asp:dropdownlist></td>
					<td class="lbl" width="10%"><asp:Literal ID="ltr_search_refuelling_dt" Text="주유일" runat="server" /></td>
					<td class="ctl" width="33%"><asp:textbox id="txt_search_refuelling_dt_from" runat="server" CssClass="ib_b_dt"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_search_refuelling_dt_from" class="ci_calendar" runat="server">&nbsp;~&nbsp;<asp:textbox id="txt_search_refuelling_dt_to" runat="server" CssClass="ib_b_dt"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_search_refuelling_dt_to" class="ci_calendar" runat="server">&nbsp;<asp:linkbutton id="sbtn_3_m" runat="server" ToolTip="3개월" OnClick="sbtn_3_m_Click"><img src="../Common/Images/calendar_3m.gif" align="top"></asp:linkbutton><asp:linkbutton id="sbtn_6_m" runat="server" ToolTip="6개월" OnClick="sbtn_6_m_Click"><img src="../Common/Images/calendar_6m.gif" align="top"></asp:linkbutton><asp:linkbutton id="sbtn_12_m" runat="server" ToolTip="12개월" OnClick="sbtn_12_m_Click"><img src="../Common/Images/calendar_12m.gif" align="top"></asp:linkbutton><asp:linkbutton id="sbtn_all_m" runat="server" ToolTip="전체" OnClick="sbtn_all_m_Click"><img src="../Common/Images/calendar_all.gif" align="top"></asp:linkbutton></td>
					<td class="lbl" width="10%"><asp:Literal ID="ltr_search_div" Text="구분" runat="server" /></td>
					<td class="ctl" width="15%"><asp:dropdownlist id="ddl_search_div" runat="server" CssClass="ddl"></asp:dropdownlist></td>
				</tr>
				<tr>
					<td class="lbl"><a href="javascript:void(0);" title="전체선택/해제" onclick="checkBoxListCheck('cbl_search_item')"><u><asp:Literal ID="ltr_search_item" Text="조회항목" runat="server" /></u></a></td>
					<td class="ctl" colspan="3"><asp:CheckBoxList id="cbl_search_item" runat="server" RepeatDirection="Horizontal" CssClass="cbl_flow" RepeatColumns="8"></asp:CheckBoxList></td>
					<td class="lbl"><asp:Literal ID="ltr_search_chart_width" Text="넓이" runat="server" /></td>
					<td class="ctl"><asp:dropdownlist id="ddl_search_chart_width" runat="server" CssClass="ddl"></asp:dropdownlist></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 챠트 시작 -->
			<table id="table_chart" class="default" runat="server">
				<tr>
					<td>
						<div class="sub_title_icon"><asp:Literal ID="ltr_stitle_distance" Text="누적주행거리(㎞)" runat="server" /></div>
						<table id="table_chart_distance" class="default" runat="server">
							<tr>
								<td class="td_box">
									<chartfx7:Chart ID="chart_distance" runat="server" Height="200px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
										<AxisY Title-Text="거리 (㎞)">
											<Grids Major-Style="Dash" Interlaced="True"></Grids>
											<LabelsFormat CustomFormat="###,###,##0" />
										</AxisY>

										<AxisX Title-Text="">
										<Grids Major-Visible="False"></Grids>
										</AxisX>

										<MainPane AxisY-Title-Text="거리 (㎞)"></MainPane>
										<SpecialObjects>
											<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
												Type="None">
											</chartfxadornments:SimpleBorder>
											<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
												ColorFrom="Transparent" EffectArea="0">
											</chartfxadornments:GradientBackground>
										</SpecialObjects>
										<Series>
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
										</Series>
									<AllSeries PointLabels-Visible="True" Gallery="Area">
									</AllSeries>
										<LegendBox Visible="False">
										</LegendBox>
									</chartfx7:Chart>
								</td>
							</tr>
							<tr>
								<td height="10"></td>
							</tr>
						</table>
						<div class="sub_title_icon"><asp:Literal ID="ltr_stitle_quantity" Text="주유량(ℓ)" runat="server" /></div>
						<table id="table_chart_quantity" class="default" runat="server">
							<tr>
								<td class="td_box">
									<chartfx7:Chart ID="chart_quantity" runat="server" Height="200px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
										<AxisY Title-Text="주유량 (ℓ)" Font="Arial, 8pt">
											<Grids Major-Style="Dash" Interlaced="True"></Grids>
											<LabelsFormat CustomFormat="###,###,##0.#0" />
										</AxisY>

										<AxisX Title-Text="">
										<Grids Major-Visible="False"></Grids>
										</AxisX>

										<MainPane AxisY-Title-Text="주유량 (ℓ)" AxisY-Font="Arial, 8pt"></MainPane>
										<SpecialObjects>
											<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
												Type="None">
											</chartfxadornments:SimpleBorder>
											<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
												ColorFrom="Transparent" EffectArea="0">
											</chartfxadornments:GradientBackground>
											<chartfx7galleries:Bar>
											</chartfx7galleries:Bar>
										</SpecialObjects>
										<Series>
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
										</Series>
									<AllSeries PointLabels-Visible="True" Gallery="Bar">
									</AllSeries>
										<LegendBox Visible="False">
										</LegendBox>
									</chartfx7:Chart>
								</td>
							</tr>
							<tr>
								<td height="10"></td>
							</tr>
						</table>
						<div class="sub_title_icon"><asp:Literal ID="ltr_stitle_amount_per_liter" Text="리터당 가격" runat="server" /></div>
						<table id="table_chart_amount_per_liter" class="default" runat="server">
							<tr>
								<td class="td_box">
									<chartfx7:Chart ID="chart_amount_per_liter" runat="server" Height="200px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
										<AxisY Title-Text="가격 (원)">
											<Grids Major-Style="Dash" Interlaced="True"></Grids>
											<LabelsFormat CustomFormat="###,###,##0" />
										</AxisY>

										<AxisX Title-Text="">
										<Grids Major-Visible="False"></Grids>
										</AxisX>

										<MainPane AxisY-Title-Text="가격 (원)"></MainPane>
										<SpecialObjects>
											<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
												Type="None">
											</chartfxadornments:SimpleBorder>
											<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
												ColorFrom="Transparent" EffectArea="0">
											</chartfxadornments:GradientBackground>
										</SpecialObjects>
										<Series>
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
										</Series>
									<AllSeries PointLabels-Visible="True">
									</AllSeries>
										<LegendBox Visible="False">
										</LegendBox>
									</chartfx7:Chart>
								</td>
							</tr>
							<tr>
								<td height="10"></td>
							</tr>
						</table>
						<div class="sub_title_icon"><asp:Literal ID="ltr_stitle_fuel_efficiency" Text="연비(월평균)" runat="server" /></div>
						<table id="table_chart_fuel_efficiency" class="default" runat="server">
							<tr>
								<td class="td_box">
									<chartfx7:Chart ID="chart_fuel_efficiency" runat="server" Height="200px" Palette="ChartFX6.ChartFX6" Width="1000px" ImageSettings-Interactive="False">
										<AxisY Title-Text="연비 (㎞/ℓ)">
											<Grids Major-Style="Dash" Interlaced="True"></Grids>
											<LabelsFormat CustomFormat="###,###,##0.#0" />
										</AxisY>

										<AxisX Title-Text="">
										<Grids Major-Visible="False"></Grids>
										</AxisX>

										<MainPane AxisY-Title-Text="연비 (㎞/ℓ)"></MainPane>
										<SpecialObjects>
											<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
												Type="None">
											</chartfxadornments:SimpleBorder>
											<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
												ColorFrom="Transparent" EffectArea="0">
											</chartfxadornments:GradientBackground>
											<chartfx7galleries:Curve>
											</chartfx7galleries:Curve>
										</SpecialObjects>
										<Series>
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
											<chartfx7:SeriesAttributes />
										</Series>
									<AllSeries PointLabels-Visible="True" Gallery="Curve">
									</AllSeries>
										<LegendBox Visible="False">
										</LegendBox>
									</chartfx7:Chart>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<!-- 챠트 끝 -->
			<!-- 리스트셋 시작 -->
			<!-- 리스트셋 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
				<asp:label id="lbl_pk" runat="server"></asp:label>
				<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			</div>
			<!-- 히든값 끝 -->
			<!-- CalendarExtender 시작 -->
			<act:CalendarExtender ID="ce_search_refuelling_dt_from" 
				runat="server" 
				TargetControlID="txt_search_refuelling_dt_from" 
				Format="yyyy-MM-dd" 
				PopupButtonID="ci_search_refuelling_dt_from" 
				EnableViewState="False" 
				BehaviorID="bi_search_refuelling_dt_from" 
				CssClass="calendar">
			</act:CalendarExtender>
			<act:CalendarExtender ID="ce_search_refuelling_dt_to" 
				runat="server" 
				TargetControlID="txt_search_refuelling_dt_to" 
				Format="yyyy-MM-dd" 
				PopupButtonID="ci_search_refuelling_dt_to" 
				EnableViewState="False" 
				BehaviorID="bi_search_refuelling_dt_to" 
				CssClass="calendar">
			</act:CalendarExtender>
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>	
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>

<script type="text/javascript" language="javascript" defer="defer">
	//검색
	function chkSearch(evt) {
		var lb_checked_item = false;
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;
		
		//조회항목 체크여부
		for (var i=0; i<getCheckBoxCntOnTable("cbl_search_item"); i++) {
			var cb = document.getElementById("cbl_search_item_"+i);
			if (cb.checked) {
				lb_checked_item = true;
			}
		}
		
		if (!lb_checked_item){
			msgBox.alert(getMsg(MSG_ERR_102), null, null, keyCode); //조회할 항목을 하나이상 선택하세요
			return false;
		}
		
		//날짜형식
		if(!isDateHyphen($F("txt_search_refuelling_dt_from"))) {
			msgBox.alert(getMsg(MSG_ERR_082), setFocus, "txt_search_refuelling_dt_from", keyCode); //잘못된 날짜형식입니다.(YYYY-MM-DD)
			return false;
		}
		if (!isDateHyphen($F("txt_search_refuelling_dt_to"))) {
			msgBox.alert(getMsg(MSG_ERR_082), setFocus, "txt_search_refuelling_dt_to", keyCode); //잘못된 날짜형식입니다.(YYYY-MM-DD)
			return false;
		}

		if(!isDateSeq($F("txt_search_refuelling_dt_from"), $F("txt_search_refuelling_dt_to"))) {
			msgBox.alert(getMsg(MSG_ERR_022), null, null, keyCode); //시작일자가 종료일자보다 늦을수 없습니다
			return false;
		}
		
		return true;
	}

	//엔터검색
	function enterSearchOnPage(evt) {
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		if (keyCode == 13) {
			if (chkSearch(evt)) {
				__doPostBack('ibtn_chart', '');
			}
		}
	}
	
</script>

</body>
</html>